package com.qfedu.yanglao20admin.sysmessage.service.impl;

import com.qfedu.yanglao20admin.sysmessage.dao.MsgCenterDao;
import com.qfedu.yanglao20admin.sysmessage.param.MsgCenter;
import com.qfedu.yanglao20admin.sysmessage.service.MsgCenterServise;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * User:  yunk
 * Date 2023/4/25  20:58
 */
@Service
public class MsgCenterServiseImpl implements MsgCenterServise {
    @Resource
    private MsgCenterDao msgCenterDao;

    @Override
    public List<MsgCenter> selectPage(MsgCenter msgCenter) {

        msgCenter.setCurrent((msgCenter.getCurrent() - 1) * msgCenter.getSize());
        List<MsgCenter> page = msgCenterDao.selectPage(msgCenter);
        return page;
    }

    @Override
    public void update() {
        msgCenterDao.update();

    }

    @Override
    public MsgCenter selectById(Integer integer) {
        return msgCenterDao.selectByid(integer);
    }
}
